<%@page import="com.senior.english.config.Constant"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="com.senior.english.config.Constant"%>
<%@page import="com.senior.english.utilities.ManageFile"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript"
	src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script type="text/javascript"
	src="<c:url value='/resources/lib/turn.min.js'/>"></script>
<!-- <c:url value='/resources/lib/turn.min.js'/> -->
<style type="text/css">
body {
	background: #ccc;
}

#magazine {
	width: 1148px; /*1152-752; 826-1066*/
	height: 730px; /*img: 578-510*/
	/* background-image: url('resources/books/wood.png'); <link rel="icon" href="resources/images/favicon.ico" type="ico">*/
	background-image: url('/english/resources/books/wood.png');
	margin: 0 auto;
}
</style>
</head>
<body>
	<div id="magazine">
		<c:forEach items="${grammar}" var="picUri">
			<div style="background-image: url(/english/${picUri});"></div>
		</c:forEach>
	</div>
	<script type="text/javascript">
		$(window).ready(function() {
			$('#magazine').turn({
				display : 'double',
				acceleration : true,
				gradients : !$.isTouch,
			});
		});

		$(window).bind('keydown', function(e) {

			if (e.keyCode == 37)
				$('#magazine').turn('previous');
			else if (e.keyCode == 39)
				$('#magazine').turn('next');

		});
	</script>

</body>
</html>